# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=ncp
pkgver=1.2.4
pkgrel=4
pkgdesc='A fast file copy tool for LANs.'
arch=('x86_64' 'aarch64')
url='http://www.fefe.de/ncp/'
license=('GPL')
depends=('libowfat')
source=("http://dl.fefe.de/$pkgname-$pkgver.tar.bz2"
        "ncp-${pkgver}_version-string.patch")
sha512sums=('7332cffef56ec8dd8afefbb3f3dda455bc4465a61476cb7a751f9fa0b9cc1c125e22f1d89b9cab36e059f3f686c8dcc847015c4a44c23dd5bca8290b5666bdc8'
            '4e580fe120fbff7c1a52f5270a21fc44f6a815c9742a4a6fde122109d19f8f3d139d8e694f6673123cfde6450b8408749eb902e12eb75938581e20d033c62071')

prepare() {
  cd "$pkgname-$pkgver"

  # Update the internal version string.
  patch -Np1 -i "../ncp-${pkgver}_version-string.patch"
}

build() {
  cd "$pkgname-$pkgver"

  make
}

package() {
  cd "$pkgname-$pkgver"

  make PREFIX="$pkgdir/usr" install
}

